﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Template.Master" Inherits="System.Web.Mvc.ViewPage<JLL.China.Model.Event>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">

    <script type="text/javascript">
        window.parent.$OuterDiv = $('<div></div>').hide().text("New Event");
        window.parent.$.fancybox.close();
        <% if (ViewData["Edit"] != null)
           { %>
          
            event = window.parent.EVENTOBJ;
            event.title ="<%= this.Model.Title %>";
            event.start = '<%= this.Model.EventDateEnd.ToShortDateString() %>';
            event.end   = '<%= this.Model.EventDateEnd.ToShortDateString() %>';
            event.color = '<%= this.Model.EventColor %>';
            event.timestart = '<%= this.Model.EventTime %>';
            event.timesend = '<%= this.Model.EventTimeEnd %>';
            event._where = "<%= this.Model.Where %>";
            event.contact = '<%= this.Model.ContactEmail %>';
            window.parent.$("#calendar").fullCalendar('updateEvent', event);
          
            window.parent.EVENTOBJ = "";
        <% }
           else
           { %>
        window.parent.$("#calendar").fullCalendar('renderEvent', { id: '<%= this.Model.Event_ID %>', title: "<%= this.Model.Title %>", start: '<%= this.Model.EventDate.ToShortDateString() %>', end: '<%= this.Model.EventDateEnd.ToShortDateString() %>', allDay: 'false', color: '<%= this.Model.EventColor %>', timestart: '<%= this.Model.EventTime %>', timesend: '<%= this.Model.EventTimeEnd %>', _where: "<%= this.Model.Where %>", contact: '<%= this.Model.ContactEmail %>' }, true);
        <% } %>
        window.parent.jSuccess(
                                    '<div class="msgnotify"><b>Saved successful</b></div>',
                                    { autoHide: true, // added in v2.0
                                        HorizontalPosition: 'center',
                                        TimeShown: 1000,
                                        VerticalPosition: 'top'
                                    });

    </script>

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="CSS" runat="server">
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="JS" runat="server">
</asp:Content>
